<% 
@servlet.getResponse().setStatus(400);

var message = @ObjectUtils.toString(@request.getAttribute("message"));

if (isBlank(message)){
	var ex = @ExceptionUtils.getThrowable(request);
	if (ex != null){
		if(@StringUtils.startsWith(@ex.getMessage(), "msg:")){
			message = @StringUtils.replace(@ex.getMessage(), "msg:", "");
		}
	}
}

if (isBlank(message)){
	message = "您的操作权限不足！";
}

// 如果是异步请求或是手机端，则直接返回信息
if (@ServletUtils.isAjaxRequest(request)) {
	print(message);
}

// 输出异常信息页面
else {
%>
<% layout('/layouts/default.html', {title: '403 - 操作权限不足'}){ %>
<link rel="stylesheet" href="${ctxStatic}/common/error.css?${_version}">
<div class="error-page">
	<div class="headline text-yellow">403</div>
	<div class="error-content">
		<h3><i class="fa fa-warning text-yellow"></i> ${message}</h3>
		<p>很抱歉，您没有权限访问此页面，若有疑问请联系管理员。</p>
		<button type="button" class="btn btn-warning btn-sm" onclick="history.go(-1);"><i
			class="fa fa-reply-all"></i> 返回上一页</button>
	</div>
	<div class="copyright">
		<% var productName = @Global.getConfig('productName'), productVersion = @Global.getConfig('productVersion'); %>
		版权所有 &copy; ${@DateUtils.getYear()} ${productName} - Powered By <a href="http://jeesite.com">JeeSite</a>.
	</div>
</div>
<% } %>
<% } %>